package com.hhkj.api.common.controller;

import com.hhkj.api.common.session.holder.model.LoginStudent;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.framework.login.api.ApiLogin;
import com.ruoyi.system.service.ISysDictDataService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author luowu
 * @Date 2024/8/9 涵 10:57:50
 */
@RestController
@RequestMapping("/api/common")
public class CommonBaseController {

    @Resource
    private ISysDictDataService dictDataService;

    @ApiLogin(LoginStudent.class)
    @PostMapping("/dict/data/list")
    public AjaxResult list(@RequestBody SysDictData dictData)
    {
        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
        return AjaxResult.success(list);
    }
}
